package com.qqt.csr.message.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 消息表
 * @author 
 */
@Getter
@Setter
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "csr_message_notify")
@JsonIgnoreProperties(ignoreUnknown = true)
public class MessageNotify implements Serializable {
    @Serial
    private static final long serialVersionUID = -8998418283413317328L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 消息动作类型：0 无；1 只弹窗；2 弹窗+跳转
     */
    @TableField(value = "action_type")
    private Integer actionType;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 扩展信息json
     */
    @TableField(value = "ext")
    private String ext;

    /**
     * 跳转路径
     */
    @TableField(value = "link_url")
    private String linkUrl;

    /**
     * 消息类型：0 文本类型
     */
    @TableField(value = "message_type")
    private Integer messageType;

    /**
     * 通知类型：0 站内信
     */
    @TableField(value = "notify_type")
    private Integer notifyType;

    /**
     * 是否已读：0 否；1 是
     */
    @TableField(value = "read_flag")
    private Integer readFlag;

    /**
     * 关联id
     */
    @TableField(value = "third_id")
    private String thirdId;

    /**
     * 接收人id
     */
    @TableField(value = "recipient_id")
    private String recipientId;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}